/* // include dependencies
const express = require('express')
const proxy = require('http-proxy-middleware')
const path = require('path');
// proxy middleware options
const options = {
  target: 'https://m.jf.10010.com', // target host
  changeOrigin: true, // needed for virtual hosted sites
  ws: true, // proxy websockets
  pathRewrite: {
    '^/proxy': '/', // rewrite path
  },
}

// create the proxy (without context)
const exampleProxy = proxy(options)

// mount `exampleProxy` in web server
const app = express()
app.use('/proxy', exampleProxy)
  .use("/m/fs", express.static(path.join(__dirname, '..', 'static')))
  .listen(8888);

 */
const compression = require('compression');
 
const express = require('express')
const static = require('./static')
const router = require('./router')
const proxy = require('./proxy')

const app = express();

app
  .use(compression())
  .use('/static/fs', static)
  .use('/api', router)
  .use('/proxy', proxy)
  .listen(8888);


  console.log("http://localhost:8888/static/fs/star.html");
  
